package com.hongyi.controller;

import com.hongyi.dto.SiteDto;
import com.hongyi.service.SiteService;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author: hongyi
 * @CreateTime: 2024-10-17
 */


@RestController
@MapperScan("com.hongyi.mapper")
@RequestMapping("/site")
public class SiteController {
    @Autowired
    private SiteService siteService;


    @GetMapping("/getAllData")
    public List<SiteDto> getAllData(){
        return siteService.queryAll();
    }
}
